package com.yang.springcloud.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
//@Entity
public class Member {
    private int id;
    private String name;
    private List<Meal> meallist = new ArrayList<>();

    public Member(int id, String name){
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Meal> getMeallist() {
        return meallist;
    }

    public void setMeallist(List<Meal> meallist) {
        this.meallist = meallist;
    }

    public void addMeal(Meal m){
        this.meallist.add(m);
    }
}
